new Vue({
	el: '#app',
	data() {
		return {
			tableData: [{
				departmentId: '1',
				departmentName: 'sun',
				employee: '老张',
				phone: '1313536789',
			}]			
		}
	},
	created() {
		this.departmentAjax();
	},
	methods: {
				departmentAjax: function() {
					var self = this;
					var xml = window.XMLHttpRequest ? new XMLHttpRequest() : ActiveXObject("microsoft.XMLHttp");
					xml.open("get", "http://www.oa.com/department/selectAll", true);
					xml.send();
					xml.onreadystatechange = function() {
						if (xml.readyState == 4 && xml.status == 200) {
							var x = xml.responseText;
							self.tableData = JSON.parse(x);
							console.log(x)
						}
					};
				},	
	
	}

})
